const { app, BrowserWindow } = require('electron');

function createWindow () {
  // 创建浏览器窗口
  let win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  });

  // 加载index.html文件
  win.loadFile('./dist/index.html');

  // win.webContents.openDevTools();

  win.on('closed', function () {
    win = null
  });
}

app.whenReady().then(createWindow);
